Skip to content

Conversation

@devreal
Copy link
Contributor

@devreal devreal commented Nov 5, 2021

Implement UxT reduction streaming terminals. The types of edge inputs and the types of the op arguments (if different) are passed as tuples instead of variadic template arguments. This allows us to convert between U and T and to use different U and T for the reducer signature.

This is WIP and so far only contains a draft of the interface in the PaRSEC backend, no UxT reducer tests yet.

Signed-off-by: Joseph Schuchart [email protected]

@devreal
Copy link
Contributor Author

devreal commented Nov 5, 2021

A note from the discussion today: we will lose some static type-checking ability with this approach since reducers effectively become converters between the type of the terminal (T) and the type of the op() argument (U). We will have to throw an exception if that conversion is not possible and no reducer is set.

@devreal devreal force-pushed the streaming_terminals_ut branch from 81abca6 to b98a47c Compare November 17, 2021 16:41
…ype are not convertible

For convertible types we can avoid the first invocation
but if there is no path to convert from T to U we use the
reducer as converter.

Signed-off-by: Joseph Schuchart <[email protected]>
@devreal devreal force-pushed the streaming_terminals_ut branch from 1d6915c to 1f152de Compare November 17, 2021 23:54
@devreal
Copy link
Contributor Author

devreal commented Nov 17, 2021

@evaleev I adapted the madness backend to the new tuple-based TT type list. Please take a look at it if you get a chance.

@pnookala Could you take a look at how the MRA benchmark could work with the new interface? It would be a good test case to try out before merging :) In short, you can use different types in the input edge and the op argument and provide a reducer that "converts" between the two.

@devreal
Copy link
Contributor Author

devreal commented Nov 18, 2021

Pushed some fixes. I still cannot compile spmm with the madness backend and I have a hard time figuring out where the template void-voodoo goes haywire...

@therault
Copy link
Contributor

This approach is problematic, because it removes the compile-time checking capabilities of reducers.

It is replaced with PR #229

@therault therault closed this Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants